home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / boot / netBoot / sun3src / memreg.h < prev    next >
Encoding:
C/C++ Source or Header  |  1988-05-13  |  2.1 KB  |  56 lines

  1.  
  2. /*    @(#)memreg.h 1.1 86/09/27 SMI    */
  3.  
  4. /*
  5.  * Copyright (c) 1986 by Sun Microsystems, Inc.
  6.  */
  7.  
  8. /*
  9.  * Rasterop hardware registers.  To do a rasterop set the
  10.  * rasterop function in mrc_op.  Clear mrc_pattern unless
  11.  * a special pattern is desired.
  12.  *
  13.  * Set mrc_shift to cause the source to be properly
  14.  * aligned with the destination:  if words are being processed
  15.  * left-to-right, then mrc_shift should be a positive number
  16.  * between 0 and 15 inclusive; if words are being processed
  17.  * right-to-left, then mrc_shift should be a negative number
  18.  * between -16 and -1 inclusive.  If the first source word
  19.  * does not supply enough data to satisfy the first destination
  20.  * words requirements then load mrc_source1 (in the left-to-right
  21.  * case) or mcr_source2 (in the right-to-left case) with the
  22.  * first source word.
  23.  *
  24.  * Load mrc_mask1 with a mask of the bits not contributed by
  25.  * the first source word (if the width were large), i.e. a
  26.  * mask of high-order bits.  Load mrc_mask2 with a mask of the
  27.  * bits not contributed by the last source word, i.e. a mask
  28.  * of low-order bits.  Set mrc_width to the number of words
  29.  * in the destination line.
  30.  *
  31.  * Then enable the chip and stuff the data through it and
  32.  * finally disable the chip.
  33.  */
  34. struct memropc {
  35.     u_short    mrc_dest;        /* destination register */
  36.     u_short    mrc_source1;        /* source1 register (right) */
  37.     u_short    mrc_source2;        /* source2 register (left) */
  38.     u_short    mrc_pattern;        /* pattern register */
  39.     u_short    mrc_mask1;        /* mask1 register */
  40.     u_short mrc_mask2;        /* mask2 register */
  41.     short    mrc_shift;        /* bit 0..3 shift count for source */
  42.                     /* bit 8    sourceload bit */
  43.     short    mrc_op;            /* function */
  44.     short    mrc_width;        /* word width */
  45.     short    mrc_opcount;        /* counts down the width */
  46.     short    mrc_decoderout;        /* decoder output */
  47.     short    mrc_x11;        /* manual load destination (diag)*/
  48.     short    mrc_x12;        /* manual load source (diag) */
  49.     short    mrc_x13;
  50.     short    mrc_x14;
  51.     short    mrc_x15;        /* flags register for applications */
  52. };
  53.  
  54. #define    mrc_enable(mrc)        ((mrc)->mrc_shift |= 0x100)
  55. #define    mrc_disable(mrc)    ((mrc)->mrc_shift &= ~0x100)
  56.